package cn.nexd.collector.wifi;

import android.content.Context;

import cn.nexd.collector.NexdCollectorConfiguration;
import cn.nexd.collector.core.Collector;
import cn.nexd.collector.listener.CollectorListener;

/**
 * Created by codngfish on 16/5/16.
 */
abstract class Wifi extends Collector {

    private static final String ANDROID_PERMISSION_ACCESS_WIFI_STATE = "android.permission.ACCESS_WIFI_STATE";
    private static final String ANDROID_PERMISSION_CHANGE_WIFI_STATE = "android.permission.CHANGE_WIFI_STATE";

    protected Wifi(Context context, NexdCollectorConfiguration collectorConfiguration, CollectorListener collectorListener) {
        super(context, collectorConfiguration, collectorListener);
    }

    @Override
    public boolean permssion() {
        return checkPermission(ANDROID_PERMISSION_ACCESS_WIFI_STATE) && checkPermission(ANDROID_PERMISSION_CHANGE_WIFI_STATE);
    }
}
